#include<bits/stdc++.h>
using namespace std;

int n, a[50];
int main()
{
	cin >> n;
	a[0] = 0;
	a[1] = 1;
	a[2] = 1;
	for(int i=3; i<=40; i++)
	{
		a[i] = a[i-1] + a[i-2];
	}
	cout << a[n] << endl;
	
	
	return 0;
}